<template>
  <el-dropdown style="cursor: pointer;">
    <span class="el-dropdown-link" >动态字段<i class="el-icon-arrow-down el-icon--right"></i></span>
    <el-dropdown-menu slot="dropdown">
      <el-checkbox-group v-model="checks" :min="1" style="padding: 0 10px">
        <div v-for="item in checkList"><el-checkbox :label="item"></el-checkbox></div>
      </el-checkbox-group>
    </el-dropdown-menu>
  </el-dropdown>
</template>

<script>
    export default {
      name: "Cloum",
      props: {
          checkbooks: {
            type: Array,
            required: true,
            default: () => []
          }
      },
      watch:{
        checks(val){
          this.$emit("checkCall", val);
        }
      },
      data(){
        return{
          checkList: this.checkbooks,
          checks: this.checkbooks,
        }
      }
    }
</script>

<style scoped>

</style>
